﻿<%@ Page Language="C#" CodeBehind="Promotions.aspx.cs" Inherits="Yglu.WebAdmin.Promotions_aspx" MasterPageFile="~/MainLayout.master" %>
<%@ MasterType TypeName="Yglu.WebAdmin.MainLayout_master" %>
<asp:Content ContentPlaceHolderID="MainContents" runat="server">
	<asp:Panel ID="PanEdit" CssClass="PanEditForm" runat="server">
		<fieldset class="FormField">
			<legend><asp:Literal ID="LitEditLegend" runat="server" /></legend>
			<ol>
				<li>
					<asp:Label AssociatedControlID="TxtPromotionId" meta:resourcekey="LblPromotionId" runat="server" />
					<asp:TextBox ID="TxtPromotionId" CssClass="FormText" Width="100px" meta:resourcekey="TxtPromotionId" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtPromotionTitle" meta:resourcekey="LblPromotionTitle" runat="server" />
					<asp:TextBox ID="TxtPromotionTitle" CssClass="FormText" Width="200px" meta:resourcekey="TxtPromotionTitle" runat="server" />
					<asp:RequiredFieldValidator ControlToValidate="TxtPromotionTitle" Display="None" meta:resourcekey="ReqTxtPromotionTitle" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtPromotionDiscount" meta:resourcekey="LblPromotionDiscount" runat="server" />
					<asp:TextBox ID="TxtPromotionDiscount" CssClass="FormText" Width="100px" meta:resourcekey="TxtPromotionDiscount" runat="server" />
					<asp:RequiredFieldValidator ControlToValidate="TxtPromotionDiscount" Display="None" meta:resourcekey="ReqTxtPromotionDiscount" runat="server" />
					<asp:RangeValidator ControlToValidate="TxtPromotionDiscount" Display="None" Type="Double" MinimumValue="0.01" MaximumValue="9999" meta:resourcekey="ValTxtPromotionDiscount" runat="server" />					
				</li>
				<li>
					<asp:Label AssociatedControlID="ChkPromotionIsPercent" meta:resourcekey="LblPromotionIsPercent" runat="server" />
					<asp:CheckBox ID="ChkPromotionIsPercent" meta:resourcekey="ChkPromotionIsPercent" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtPromotionProducts" meta:resourcekey="LblPromotionProducts" runat="server" />
					<asp:TextBox ID="TxtPromotionProducts" CssClass="FormText" Width="100px" meta:resourcekey="TxtPromotionProducts" runat="server" />
					<asp:RangeValidator ControlToValidate="TxtPromotionProducts" Display="None" Type="Integer" MinimumValue="0" MaximumValue="9999" meta:resourcekey="ValTxtPromotionProducts" runat="server" />					
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtPromotionCombos" meta:resourcekey="LblPromotionCombos" runat="server" />
					<asp:TextBox ID="TxtPromotionCombos" CssClass="FormText" Width="100px" meta:resourcekey="TxtPromotionCombos" runat="server" />
					<asp:RangeValidator ControlToValidate="TxtPromotionCombos" Display="None" Type="Integer" MinimumValue="0" MaximumValue="9999" meta:resourcekey="ValTxtPromotionCombos" runat="server" />					
				</li>
				<li>
					<asp:Label AssociatedControlID="CboStore" meta:resourcekey="LblStore" runat="server" />
					<asp:DropDownList ID="CboStore" CssClass="FormSelect" Width="200px" DataTextField="Title" DataValueField="Id" meta:resourcekey="CboStore" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="ChkPromotionAutomatic" meta:resourcekey="LblPromotionAutomatic" runat="server" />
					<asp:CheckBox ID="ChkPromotionAutomatic" meta:resourcekey="ChkPromotionAutomatic" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="ChkPromotionActive" meta:resourcekey="LblPromotionActive" runat="server" />
					<asp:CheckBox ID="ChkPromotionActive" meta:resourcekey="ChkPromotionActive" runat="server" />
				</li>
			</ol>
			<div class="FormFooterBar">
				<asp:Button CssClass="FormButton" OnClick="ButSave_Click" meta:resourcekey="ButSave" runat="server" />
				<asp:Button CssClass="FormButton" OnClick="ButCancel_Click" CausesValidation="false" meta:resourcekey="ButCancel" runat="server" />
				<asp:ValidationSummary CssClass="ValSummary" DisplayMode="List" ShowSummary="true" HeaderText="<%$ Resources:Messages,ValidationSummary %>" runat="server" />
			</div>
		</fieldset>
		<asp:PlaceHolder ID="PlaceReports" runat="server">
			<fieldset class="PageReportField">
				<legend><asp:Literal meta:resourcekey="LitOrderReports" runat="server" /></legend>
				<asp:GridView ID="GridReports" runat="server">
					<Columns>
						<asp:BoundField DataField="Title" ReadOnly="true" meta:resourcekey="GridColPeriod" />
						<asp:BoundField DataField="Count" ReadOnly="true" meta:resourcekey="GridColCount" />
						<asp:BoundField DataField="MostUsedInStoreTitle" ReadOnly="true" meta:resourcekey="GridColStore" />
					</Columns>
				</asp:GridView>
			</fieldset>
		</asp:PlaceHolder>
	</asp:Panel>
	<asp:Panel ID="PanGrid" runat="server">
		<asp:Button ID="ButAddNew" CssClass="FormButton ButtonAddNew" OnClick="ButAddNew_Click" meta:resourcekey="ButAddNew" runat="server" />
		<asp:Label ID="LblGridCount" meta:resourcekey="LblGridCount" runat="server" />
		<asp:GridView ID="GridPromotions" OnRowCommand="GridPromotions_RowCommand" runat="server">
			<Columns>
				<asp:BoundField DataField="Id" SortExpression="Id" ReadOnly="true" meta:resourcekey="GridColId" />
				<asp:BoundField DataField="Title" SortExpression="Title" ReadOnly="true" meta:resourcekey="GridColTitle" />
				<asp:BoundField DataField="Discount" SortExpression="Discount" ReadOnly="true" DataFormatString="{0:0.00}" meta:resourcekey="GridColDiscount" />
				<asp:BoundField DataField="IsPercent" SortExpression="IsPercent" ReadOnly="true" meta:resourcekey="GridColIsPercent" />
				<asp:BoundField DataField="Products" SortExpression="Products" ReadOnly="true" meta:resourcekey="GridColProducts" />
				<asp:BoundField DataField="Combos" SortExpression="Combos" ReadOnly="true" meta:resourcekey="GridColCombos" />
				<asp:BoundField DataField="Automatic" SortExpression="Automatic" ReadOnly="true" meta:resourcekey="GridColAutomatic" />
				<asp:BoundField DataField="AllStores" SortExpression="AllStores" ReadOnly="true" meta:resourcekey="GridColAllStores" />
				<asp:BoundField DataField="Active" SortExpression="Active" ReadOnly="true" meta:resourcekey="GridColActive" />
				<asp:ButtonField AccessibleHeaderText="Edit" meta:resourcekey="GridColEdit" />
			</Columns>
		</asp:GridView>
	</asp:Panel>
</asp:Content>